package com.ruoyi.backStage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.backStage.mapper.CommonUserMapper;
import com.ruoyi.backStage.domain.CommonUser;
import com.ruoyi.backStage.service.ICommonUserService;

/**
 * 普通用户Service业务层处理
 * 
 * @author xingxing
 * @date 2023-07-02
 */
@Service
public class CommonUserServiceImpl implements ICommonUserService 
{
    @Autowired
    private CommonUserMapper commonUserMapper;

    /**
     * 查询普通用户
     * 
     * @param id 普通用户主键
     * @return 普通用户
     */
    @Override
    public CommonUser selectCommonUserById(Long id)
    {
        return commonUserMapper.selectCommonUserById(id);
    }

    /**
     * 查询普通用户列表
     * 
     * @param commonUser 普通用户
     * @return 普通用户
     */
    @Override
    public List<CommonUser> selectCommonUserList(CommonUser commonUser)
    {
        return commonUserMapper.selectCommonUserList(commonUser);
    }

    /**
     * 新增普通用户
     * 
     * @param commonUser 普通用户
     * @return 结果
     */
    @Override
    public int insertCommonUser(CommonUser commonUser)
    {
        return commonUserMapper.insertCommonUser(commonUser);
    }

    /**
     * 修改普通用户
     * 
     * @param commonUser 普通用户
     * @return 结果
     */
    @Override
    public int updateCommonUser(CommonUser commonUser)
    {
        return commonUserMapper.updateCommonUser(commonUser);
    }

    /**
     * 批量删除普通用户
     * 
     * @param ids 需要删除的普通用户主键
     * @return 结果
     */
    @Override
    public int deleteCommonUserByIds(Long[] ids)
    {
        return commonUserMapper.deleteCommonUserByIds(ids);
    }

    /**
     * 删除普通用户信息
     * 
     * @param id 普通用户主键
     * @return 结果
     */
    @Override
    public int deleteCommonUserById(Long id)
    {
        return commonUserMapper.deleteCommonUserById(id);
    }
}
